/*
 * TryOutput.java
 *
 * Created on Jun 28, 2009, 2:18:47 PM
 */
package studentGUI;

import cayenne.DBobjects.Problem;

/**
 *
 * @author radu
 */
public class TryOutput extends javax.swing.JDialog {

    /** Creates new form TryOutput */
    public TryOutput(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    public TryOutput(java.awt.Frame parent, boolean modal, Problem someProblem) {
        super(parent, modal);
        initComponents();
        setTitle(someProblem.getName());
    }

    public void addText(String text) {
        outputTA.setText(outputTA.getText() + text);
    }

    public String getText() {
        return outputTA.getText();
    }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        outputSP = new javax.swing.JScrollPane();
        outputTA = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(new javax.swing.BoxLayout(getContentPane(), javax.swing.BoxLayout.LINE_AXIS));

        outputSP.setPreferredSize(new java.awt.Dimension(500, 600));

        outputTA.setColumns(20);
        outputTA.setRows(5);
        outputSP.setViewportView(outputTA);

        getContentPane().add(outputSP);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane outputSP;
    private javax.swing.JTextArea outputTA;
    // End of variables declaration//GEN-END:variables
}
